Typography
QuickDraw GX treats text both as text (a sequence of character codes that can be displayed and edited) and as graphics, meaning that all of the color graphics capabilities of QuickDraw GX are available for the display of text.Each line of text can be a shape in QuickDraw GX. Using the typographic features of QuickDraw GX, you can generate and manipulate fully editable, text-related shapes with characteristics such as the following:
Because a line of text is a QuickDraw GX shape, you can color it, fill it with a pattern, scale it, rotate it, and transform it like any graphic shape--all the while maintaining its identity and editability as a text line. You can also use certain typographic shapes, either as-is or converted to purely geometric shapes, to perform further graphic operations with them, such as clipping, dashing, and patterning.
- Simplicity. Text can have a single font at a single size, with no changes in stylistic variation along the line. This type of text is most useful in dialog boxes or other situations where relatively unsophisticated string presentation is needed.
- Flexible alignment and justification. Text can be (1) left aligned, right aligned, or any point of alignment in between (including centered); and (2) unjustified, fully justified, or any level of justification in between.
- Multiple styles. Each glyph or any set of glyphs can be styled (given a font, size, or set of typographic characteristics) independently of every other glyph.
- Independent glyph positions. Each glyph can have any style and be positioned independently of every other glyph, so that text can be made to follow a curved path or circle.
- Sophisticated layout. Text lines can exhibit great typographic sophistication, with features such as kerning, tracking, shifting, ligature formation, and contextual glyph substitution.
- Multilanguage text handling. Text can be properly formatted in any language supported by a QuickDraw GX font, even contextual right-to-left languages such as Arabic, or languages with large character sets such as Chinese. Multiple languages, even with mixed text directions, can coexist on the same line.
- Vertical text. Text such as Japanese and Chinese can be written vertically, and intermixed with properly oriented vertical Roman text.
QuickDraw GX also provides functions that help you manipulate sets of text lines, even the most typographically sophisticated text lines, for word-processing tasks such as hit-testing and line-breaking.
Much of the text-layout sophistication of QuickDraw GX depends on information in tables in QuickDraw GX fonts, which have many features--some of which may be enabled by default--that your application can use or disable, as desired.
The typographic capabilities of QuickDraw GX are described in detail in Inside Macintosh: QuickDraw GX Typography.